var arr = [];
$.ajax({
    url : "http://localhost/ci/admin/user/menu",
    type : "get",
    data : {'token':localStorage.token,'user_token':localStorage.user},
    dataType : "json",
    async: false,
    success : function(data){
        arr =data['data'];
        console.log(arr);
        if(data=='0'){
            top.location="http://localhost/ci/login/login/login";
        }
    }
})
 var navs=arr;

/*var navs = [{
	"title" : "后台首页",
	"icon" : "icon-computer",
	"href" : "http://localhost/ci/",
	"spread" : false
},{
	"title" : "文章列表",
	"icon" : "icon-text",
	"href" : "http://localhost/ci/admin/news",
	"spread" : false
},{
	"title" : "友情链接",
	"icon" : "icon-text",
	"href" : "http://localhost/ci/admin/links",
	"spread" : false
},{
    "title" : "系统基本参数",
    "icon" : "&#xe631;",
    "href" : "http://localhost/ci/admin/systemParameter",
    "spread" : false
},{
    "title" : "部门管理",
    "icon" : "&#xe631;",
    "href" : "http://localhost/ci/admin/department",
    "spread" : false
},{
    "title" : "日志管理",
    "icon" : "&#xe631;",
    "href" : "",
    "spread" : false
},{
	"title" : "用户管理",
	"icon" : "&#xe61c;",
	"href" : "",
	"spread" : false,
    "children" : [
        {
            "title" : "全部用户",
            "icon" : "&#xe631;",
            "href" : "http://localhost/ci/admin/user",
            "spread" : false
        },
        {
            "title" : "添加用户",
            "icon" : "&#xe631;",
            "href" : "http://localhost/ci/admin/user/addUser",
            "spread" : false
        }
    ]
},{
    "title" : "权限管理",
    "icon" : "&#xe61c;",
    "href" : "",
    "spread" : false,
    "children" : [
        {
            "title" : "角色列表",
            "icon" : "&#xe631;",
            "href" : "http://localhost/ci/admin/role/index",
            "spread" : false
        },
        {
            "title" : "权限列表",
            "icon" : "&#xe631;",
            "href" : "",
            "spread" : false
        }
    ]
}]*/

